package com.koron.order.risk.util;

/**
 * @author jzp
 * @since 2022/12/15
 */
public class LineRiskConstant {
    // risk_control_status
    public static final class Status{
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 风险管控中
        public static final String MANAGEMENT = "MANAGEMENT";
        // 消除审核
        public static final String ELIMINATE_REVIEW = "ELIMINATE_REVIEW";
        // 已归档
        public static final String ARCHIVED = "ARCHIVED";
        // 已作废
        public static final String CANCEL = "CANCEL";

        public static int getStatusWeight(String status){
            if (status == null) {
                return 0;
            }
            switch (status) {
                case Status.DRAFT:
                    return 0;
                case Status.WAIT_REVIEW:
                    return 1;
                case Status.MANAGEMENT:
                    return 2;
                case Status.ELIMINATE_REVIEW:
                    return 3;
                case Status.ARCHIVED:
                    return 4;
                case Status.CANCEL:
                    return 5;

            }
            return -1;
        }
    }

}
